{extend name="common@create" /}
{block name="formaa"}
	<form action="/subject/{$list.id}" method="PUT" class="form form-horizontal" id="form-member-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>标题：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$list.title}" placeholder="学科全称" id="title" name="title">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>简称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$list.jiancheng}" placeholder="学科简称" id="jiancheng" name="jiancheng">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>分类：</label>
			<div class="formControls col-xs-8 col-sm-9 f-l">
				<span class="select-box f-l" style="width:180px;">
				{php}$category = getCategory(110);{/php}
				<select class="select" id="category" name="category" size="1" required>
					<option value="">--请选择学科分类--</option>
					{volist name="category" id="vo"}
						<option value="{$vo.id}" {eq name="$list.category" value="$vo.id" }selected{/eq}>{$vo.title}</option>
					{/volist}
				</select>
				</span>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>是否参加考试：</label>
			<div class="formControls col-xs-8 col-sm-9 skin-minimal">
				<div class="radio-box">
					<input name="kaoshi" type="radio" id="kaoshi-1" value="1" {eq name="$list.kaoshi" value="是" }checked="checked"{/eq} required>
					<label for="kaoshi-1">参加</label>
				</div>
				<div class="radio-box">
					<input type="radio" id="kaoshi-2" value="0" name="kaoshi"  {eq name="$list.kaoshi" value="否" }checked="checked"{/eq}>
					<label for="kaoshi-2">不参加</label>
				</div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-3">排序：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="{$list.paixu}" placeholder="默认为999" id="paixu" name="paixu">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
				<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
{/block}
{block name="yanzheng"}
<script type="text/javascript">
	// 设置表单验证规则
	var myrules = {
			title:{
				required:true,
				rangelength:[2,25]
			},
			jiancheng:{
				required:true,
				rangelength:[1,6]
			},
			category:{
				required:true,
				digits:true
			},
		};

	// 设置表单提交方式
	var mytype = 'PUT';
</script>
{/block}